cmake_minimum_required(VERSION 2.8)

project( examples )

find_package( OpenCV REQUIRED )
find_package( OpenGL )

if(OPENGL_FOUND)
  include_directories( ${OpenCV_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} )
else()
  include_directories( ${OpenCV_INCLUDE_DIRS} )
endif()

#########################
# FOR LEARNING OPENCV 3 #
#########################

###############
### COMPILE ###
###############

add_executable( main main.cpp )
add_executable( watershed  watershed.cpp )
target_link_libraries( main ${OpenCV_LIBS} )
target_link_libraries(watershed  ${OpenCV_LIBS} )


